<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<div class="table-responsive">
        <table  id="table" class="table table-striped table-hover" >
       		<thead>
				<tr>
					<th style="text-align:center">项目编号 </th>
					<th style="width:250px;text-align:center">项目名称</th>
					<th style="text-align:center">客户名称</th>
					<th style="text-align:center">项目简介</th>
					<th style="text-align:center">项目状态</th>
					<th style="text-align:center">项目提出方</th>
					<th style="text-align:center">主管业务部门</th>
					<th style="text-align:center">线路类型</th>
					<th style="text-align:center">前置机IP</th>
					<th style="text-align:center">申请时间</th>
					<th style="text-align:center">项目结果</th>
					<th style="text-align:center">备注</th>
					<th style="text-align:center">操作</th>	
				</tr>
			</thead>
			<tbody>
				<s:iterator value="#session.consumerList" id="consumer" status="st" >
					<tr align="center">
			  			<td><s:property value="#consumer.projectId"/></td>
			  			<td><s:property value="#consumer.projectName"/></td>
			  			<td><s:property value="#consumer.consumerName"/></td>
			  			<td>
				  			<a type="button" class="btn btn-default" data-toggle="projectIntroduction" title="项目简介"  data-placement="left"
				  				data-content="<s:property value="#consumer.projectIntroduction"/>">项目详情
				  			</a>
							<script>
								$(function () {
							  		$('[data-toggle="projectIntroduction"]').popover();
								});
							</script>
		  				</td>
			  			<td><s:property value="#consumer.projectStatus"/></td>
			  			<td><s:property value="#consumer.proposeUnit"/></td>
			  			<td><s:property value="#consumer.masterUnit"/></td>
			  			<td><s:property value="#consumer.lineType"/></td>
			  			<td><s:property value="#consumer.frontEndIP"/></td>
			  			<td><s:property value="#consumer.applyTime"/></td>
			  			<td><s:property value="#consumer.projectResult"/></td>
			  			<td>
				  			<a type="button" class="btn btn-default" data-toggle="remark" title="备注信息"  data-placement="left"
				  				data-content="<s:property value="#consumer.remark"/>">详情
				  			</a>
							<script>
								$(function () {
							  		$('[data-toggle="remark"]').popover();
								});
							</script>
		  				</td>
			  			<td><a type="button" class="btn btn-success" href="<s:url action="selectBigConsumerById">
			  					<s:param name="projectId" value="%{#consumer.projectId}"></s:param>
			  				</s:url>">更新</a> 
			  			</td>
						<!--  
						<td>
							<input data-toggle="modal"  data-target="#consumer"  id="#st.index+1"
							class="btn btn-primary" type="button" value="更新"  onclick="editInfo(this)" />
						</td>
	
			  			<script type="text/javascript">
			  				$('#consumer').modal("hide");
			  				
			  				function editInfo(obj) {
								var id = $(obj).attr("id");
								console.log("id:"+id);
								
								var projectId = document.getElementById("table").rows[id].cells[0].innerText;
								console.log("projectId"+projectId);
								
								$('#projectId').val(projectId);
							
								//$('#consumer').modal('show');
							}
							
			  			</script>
			  			-->
			  		</tr>
			  		<!-- 
					<div class="modal fade" id="consumer" tabindex="-1" role="dialog" aria-labelledby="consumerLabel" aria-hidden="true">
					  <div class="modal-dialog">
					    <div class="modal-content">
					      <div class="modal-header">
					        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
					        <h4 class="modal-title" id="consumerLabel">更新大客户项目信息</h4>
					      </div>
					      <s:form role="form" action="updateBigConsumerById" method="post" theme="bootstrap">
						      <div class="modal-body">
						      	<s:actionerror theme="bootstrap"/>
					          	<s:actionmessage theme="bootstrap"/>
					          	<s:fielderror theme="bootstrap"/>
						  		<div class="row">
								  <div class="form-group col-xs-10 col-md-offset-1">
								    <label for="projectId">项目编号</label>
								    <s:textfield  class="form-control" name="projectId" id="projectId" placeholder="year-month-number" readonly="true"/>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1">
								  	<label for="projectId">项目名称</label>
								    <s:textfield  class="form-control" name="projectName" placeholder="the project name..."/>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1">
								    <label for="requirementIntroduction">项目简介</label>
								    <s:textarea  class="form-control" row="3" name="projectIntroduction" placeholder="to introduce the project..."/>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1">
								    <label for="projectStatus">营销状态</label>
								    <select name="projectStatus" class="form-control">
								    		<option>营销中</option>
								     		<option>营销成功</option>
								     		<option>营销失败</option>
								    </select>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1">
								    <label for="proposeUnit">项目提出单位</label>
								    <s:textfield  class="form-control" name="proposeUnit" placeholder="which unit propose the project?"/>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1 input-append date" id="applyTime">
								    <label for="applyTime">申请时间</label>
								    <s:textfield type="date" id="applyTime" class="form-control" name="applyTime" placeholder="when the project are proposed?" required="true"/>
								    <span class="add-on"><i class="icon-calendar"></i></span>
								    <script>
								    	$('#applyTime').datetimepicker({
									    	format: 'yyyy/mm/dd',
									    	startDate: '2016/01/01',
									    	autoclose: 'true',
									    	minView: 'month',
									    	todayBtn: 'linked',
									    	todayHighlight: 'ture',
									    	language: 'zh-CN'
									    });
								    </script>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1">
								    <label for="projectResult">项目结果</label>
								    <select name="projectResult" class="form-control">
								    		<option>等待营销结果</option>
								    		<option>等待排期</option>
								     		<option>开发</option>
								     		<option>测试</option>
								     		<option>待投产</option>
								     		<option>已投产</option>
								    </select>
								  </div>
								  <div class="form-group col-xs-10 col-md-offset-1">
								    <label for="remark">备注</label>
								    <s:textfield  class="form-control" name="remark" placeholder="anything else..."/>
								  </div>
							  </div>
							</div> 
					    	<div class="modal-footer">
					      		<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					      		<button type="submit" class="btn btn-primary">更新</button>
					     	  </div>
					     </s:form>
					    </div>
					  </div>
					</div>
					 -->					
		  		</s:iterator>
	  		</tbody>
	  </table>
</div>
